package com.prs.crm.domain.approval;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;
/**
 * @author 廖苹宏
 * @version 2012-5-29 9:15:19 自定义编号
 * */
@Entity
@Table(name="app_numberSet")
public class AppNumberSet extends BaseEntity{
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;
	/**追加内容*/
	private String content;
	/**样式编辑*/
	private String cssEdit;
	/**样式显示*/
	private String cssShow;
	/**累加方式*/
	private String radioacc;
	/**编号位数*/
	private String numCount;
	/**当前编号*/
	private String nowNum;
	/**使用此编号的模板*/
	@OneToMany(cascade={CascadeType.ALL})
	private Set<ShenQingType> shenQingTypes;
	//便于添加
	public void addShenQingTypes(ShenQingType shen){
		if(shenQingTypes == null){
			shenQingTypes = new HashSet<ShenQingType>();
		}
		shen.setAppNumberSet(this);
		shenQingTypes.add(shen);
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getCssEdit() {
		return cssEdit;
	}
	public void setCssEdit(String cssEdit) {
		this.cssEdit = cssEdit;
	}
	public String getCssShow() {
		return cssShow;
	}
	public void setCssShow(String cssShow) {
		this.cssShow = cssShow;
	}
	public String getRadioacc() {
		return radioacc;
	}
	public void setRadioacc(String radioacc) {
		this.radioacc = radioacc;
	}
	public String getNumCount() {
		return numCount;
	}
	public void setNumCount(String numCount) {
		this.numCount = numCount;
	}
	public String getNowNum() {
		return nowNum;
	}
	public void setNowNum(String nowNum) {
		this.nowNum = nowNum;
	}

	public Set<ShenQingType> getShenQingTypes() {
		return shenQingTypes;
	}

	public void setShenQingTypes(Set<ShenQingType> shenQingTypes) {
		this.shenQingTypes = shenQingTypes;
	}
	
	
}
